#ifndef __SWEI_CERT_H
#define __SWEI_CERT_H

#include <stdint.h>
#include <stddef.h>

#ifdef __cplusplus
extern "C" {
#endif

#define CA_FILE_NAME          "\"cacert\""
#define CLIENT_CERT_FILE_NAME "\"clientcert\""
#define CLIENT_KEY_FILE_NAME  "\"clientkey\""
// int mmgr_cert_upload_handler(void)


typedef struct{
    uint8_t is_ca_need;
    const char *ca_ptr;

    uint8_t is_cert_need;
    const char *cert_ptr;
    const char *key_ptr;
}ssl_cert_t;


#define MMGR_UPLOAD_TLS_CA        (0x01)

extern const char *tls_ca_cert;

void swei_socket_cert_get(ssl_cert_t *ssl_data_ptr);
int32_t swei_cert_upload_process(void);
void swei_cert_status_update(int32_t prm, void *data, size_t size);
int32_t swei_cert_upload_request(uint8_t upload_mask);
#ifdef __cplusplus
}
#endif


#endif